<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  	<head> 
	    <title>资讯管理</title>
	    <meta http-equiv="X-UA-Compatible" content='IE=edge' />
	     <%@ include file="/inc/info.inc" %>
	     <link rel="stylesheet" type="text/css" href="css/newsEdit.css">
		<link rel='stylesheet' type="text/css" href='/fw/js/jquery/plugins/uploadify/uploadify.css' />
		<script type="text/javascript" src="/fw/js/jquery/plugins/jquery.form.min.js"></script>
		<script type="text/javascript" src="/fw/js/myjs/jvalidator.js"></script>
		<script type="text/javascript" src="/fw/js/myjs/form.validator.js"></script>
		<script type="text/javascript" src='/fw/js/jquery/plugins/uploadify/jquery.uploadify.min.js'></script>
		<script type="text/javascript" src="/fw/js/myjs/bootstrap-savehandle.js"></script>
		<script type="text/javascript" src="/fw/js/ajaxfileupload.js"></script>
		<script type="text/javascript" src="js/newsEdit.js"></script>
  	</head>
  	<body>
	 	<div id="newsEdit">
	 		<div><%@ include file="../manage/heading.jsp" %></div>
	  		<s:action name="groupmenu" executeResult="true" namespace="/groupmenu"></s:action>
	  		<div class="content">
				<div class="header">
			 		<ol class="breadcrumb">
						<li class="glyphicon glyphicon-top-right">
							<a href="#">
								<span aria-hidden="true" style="font-size:20px;">&raquo;</span>
							</a>
						</li>
						<li>
							<a href="/fw/pages/news/newsList.jsp">资讯列表</a>
						</li>
						<li class="active">添加资讯</li>
					</ol>
			 		<form id="newsEditForm" class="form-horizontal">
			 			<input type="hidden" id="newsId"/>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">标题</label>
							<input type="text" class="form-control col-5p" validator="empty|betweenlength(1,50)" id="newsName"/>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">分类</label>
							<select id="newsCateId" class="form-control col-5p" validator="empty">
							</select>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">推荐</label>
							<div style="padding-top: 7px;">
								<input type="checkbox" id="isRecommend">
								<label for="isRecommend" style="font-weight: normal;">是否推荐</label>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">视频链接</label>
							<input type="text" class="form-control col-5p" validator="empty|betweenlength(1,500)" id="videoUrl"/>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">列表图片（200*150）</label>
							<input  type="file" id="upfile" name="file" onchange="upload()"><br/>
							<input class="form-control col-5p" type="hidden" name="imgUrl" id="imgUrl">
							<div id="upimg" class="col-sm-offset-3"></div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">分享图片（150*150）</label>
							<input  type="file" id="upfile_share" name="file" onchange="upload_share()"><br/>
							<input class="form-control col-5p" type="hidden" name="shareImgUrl" id="shareImgUrl">
							<div id="upimg_share" class="col-sm-offset-3"></div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">关注名称</label>
							<input type="text" class="form-control col-5p" validator="empty|betweenlength(1,20)" id="attentionName"/>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">关注跳转</label>
							<textarea class='form-control col-5p' rows='5' id="attentionUrl" validator="empty" style="resize:none"></textarea>
						</div>
						<div id='alertdiv'></div>
						<div class="alert alert-danger" style="display: none;"></div>
						<br/>
						<p class="col-sm-offset-3 col-sm-9">
							<button onclick="add()" type="button"  class="btn btn-primary">确定</button>
						</p>
				 	</form>
	 			</div>
		 	</div>
	 	</div> 
  	</body>
</html>
